<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>QtWebApp: stefanfrings::LogMessage Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">QtWebApp
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classstefanfrings_1_1LogMessage.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classstefanfrings_1_1LogMessage-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">stefanfrings::LogMessage Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Represents a single log message together with some data that are used to decorate the log message.  
 <a href="classstefanfrings_1_1LogMessage.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="logmessage_8h_source.html">logmessage.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aaad830e947d03f40e2fe0fb9f7e0851c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1LogMessage.html#aaad830e947d03f40e2fe0fb9f7e0851c">LogMessage</a> (const QtMsgType type, const QString &amp;message, const QHash&lt; QString, QString &gt; *logVars, const QString &amp;file, const QString &amp;function, const int line)</td></tr>
<tr class="memdesc:aaad830e947d03f40e2fe0fb9f7e0851c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="classstefanfrings_1_1LogMessage.html#aaad830e947d03f40e2fe0fb9f7e0851c">More...</a><br /></td></tr>
<tr class="separator:aaad830e947d03f40e2fe0fb9f7e0851c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0afc95ed8eb8b5cc611b5b9436f65053"><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1LogMessage.html#a0afc95ed8eb8b5cc611b5b9436f65053">toString</a> (const QString &amp;msgFormat, const QString &amp;timestampFormat) const</td></tr>
<tr class="memdesc:a0afc95ed8eb8b5cc611b5b9436f65053"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the log message as decorated string.  <a href="classstefanfrings_1_1LogMessage.html#a0afc95ed8eb8b5cc611b5b9436f65053">More...</a><br /></td></tr>
<tr class="separator:a0afc95ed8eb8b5cc611b5b9436f65053"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e0563caa0e118de2b9664b08ee6c856"><td class="memItemLeft" align="right" valign="top"><a id="a6e0563caa0e118de2b9664b08ee6c856"></a>
QtMsgType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classstefanfrings_1_1LogMessage.html#a6e0563caa0e118de2b9664b08ee6c856">getType</a> () const</td></tr>
<tr class="memdesc:a6e0563caa0e118de2b9664b08ee6c856"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the message type. <br /></td></tr>
<tr class="separator:a6e0563caa0e118de2b9664b08ee6c856"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents a single log message together with some data that are used to decorate the log message. </p>
<p>The following variables may be used in the message and in msgFormat:</p>
<ul>
<li>{timestamp} Date and time of creation</li>
<li>{typeNr} Type of the message in numeric format (0-3)</li>
<li>{type} Type of the message in string format (DEBUG, WARNING, CRITICAL, FATAL)</li>
<li>{thread} ID number of the thread</li>
<li>{msg} Message text</li>
<li>{xxx} For any user-defined logger variable</li>
</ul>
<p>Plus some new variables since QT 5.0, only filled when compiled in debug mode:</p>
<ul>
<li>{file} Filename where the message was generated</li>
<li>{function} Function where the message was generated</li>
<li>{line} Line number where the message was generated </li>
</ul>

<p class="definition">Definition at line <a class="el" href="logmessage_8h_source.html#l00036">36</a> of file <a class="el" href="logmessage_8h_source.html">logmessage.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aaad830e947d03f40e2fe0fb9f7e0851c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaad830e947d03f40e2fe0fb9f7e0851c">&#9670;&nbsp;</a></span>LogMessage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LogMessage::LogMessage </td>
          <td>(</td>
          <td class="paramtype">const QtMsgType&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QHash&lt; QString, QString &gt; *&#160;</td>
          <td class="paramname"><em>logVars</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>function</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>line</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<p>All parameters are copied, so that later changes to them do not affect this object. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>Type of the message </td></tr>
    <tr><td class="paramname">message</td><td>Message text </td></tr>
    <tr><td class="paramname">logVars</td><td><a class="el" href="classstefanfrings_1_1Logger.html" title="Decorates and writes log messages to the console, stderr.">Logger</a> variables, 0 is allowed </td></tr>
    <tr><td class="paramname">file</td><td>Name of the source file where the message was generated </td></tr>
    <tr><td class="paramname">function</td><td>Name of the function where the message was generated </td></tr>
    <tr><td class="paramname">line</td><td>Line Number of the source file, where the message was generated </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="logmessage_8cpp_source.html#l00011">11</a> of file <a class="el" href="logmessage_8cpp_source.html">logmessage.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a0afc95ed8eb8b5cc611b5b9436f65053"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0afc95ed8eb8b5cc611b5b9436f65053">&#9670;&nbsp;</a></span>toString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString LogMessage::toString </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>msgFormat</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>timestampFormat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the log message as decorated string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msgFormat</td><td>Format of the decoration. May contain variables and static text, e.g. "{timestamp} {type} thread={thread}: {msg}". </td></tr>
    <tr><td class="paramname">timestampFormat</td><td>Format of timestamp, e.g. "dd.MM.yyyy hh:mm:ss.zzz", see QDateTime::toString(). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>QDatetime for a description of the timestamp format pattern </dd></dl>

<p class="definition">Definition at line <a class="el" href="logmessage_8cpp_source.html#l00029">29</a> of file <a class="el" href="logmessage_8cpp_source.html">logmessage.cpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>logging/<a class="el" href="logmessage_8h_source.html">logmessage.h</a></li>
<li>logging/<a class="el" href="logmessage_8cpp_source.html">logmessage.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>stefanfrings</b></li><li class="navelem"><a class="el" href="classstefanfrings_1_1LogMessage.html">LogMessage</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
